package tech.aistar.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.mapper.UserMapper;
import tech.aistar.pojo.User;


@Service // 属于spring的组件
public class UserServiceImpl implements UserService{

    //业务逻辑层调用Mapper层
    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUserByEmail(String email) {
        //TODO... email的格式的校验
        //具体的业务逻辑层的代码.
        User user = userMapper.findByEmail(email);
        return user;
    }
}

